---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
      name:  <unnamed>
       log:  /Users/jesse/Dropbox/voter_id/Replication/table1.log
  log type:  text
 opened on:  17 Aug 2020, 09:27:38

. 
. use id dem rep hispanic black white othernw ///
>         birth_year voted no_dmv_match new_reg using "$path/nc_dataset.dta" if new_reg == 0, clear

. gen unaffil = dem == 0 & rep == 0 

. compress
  variable unaffil was float now byte
  (238,583,484 bytes saved)

. 
. egen non_miss = rownonmiss(hispanic black white othernw birth_year voted)

. gen in_sample = non_miss == 6

. drop non_miss

. 
. sum voted if in_sample

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
       voted | 77,765,076    .3820391     .485886          0          1

. local m1 = r(mean)

. local sd1 = r(sd)

. local min1 = r(min)

. local max1 = r(max)

. local n1 = r(N)

. 
. sum hispanic if in_sample

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
    hispanic | 77,765,076    .0196319    .1387317          0          1

. local m2 = r(mean)

. local sd2 = r(sd)

. local min2 = r(min)

. local max2 = r(max)

. 
. sum black if in_sample

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
       black | 77,765,076    .2289624     .420165          0          1

. local m3 = r(mean)

. local sd3 = r(sd)

. local min3 = r(min)

. local max3 = r(max)

. 
. sum white if in_sample

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
       white | 77,765,076    .7153944    .4512264          0          1

. local m4 = r(mean)

. local sd4 = r(sd)

. local min4 = r(min)

. local max4 = r(max)

. 
. sum othernw if in_sample

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
     othernw | 77,765,076    .0360114    .1863184          0          1

. local m5 = r(mean)

. local sd5 = r(sd)

. local min5 = r(min)

. local max5 = r(max)

. 
. sum birth_year if in_sample

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
  birth_year | 77,765,076    1965.512    17.98704       1910       1999

. local m6 = r(mean)

. local sd6 = r(sd)

. local min6 = r(min)

. local max6 = r(max)

. 
. sum dem if in_sample

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
         dem | 77,765,076    .4198714    .4935376          0          1

. local m13 = r(mean)

. local sd13 = r(sd)

. local min13 = r(min)

. local max13 = r(max)

. 
. sum rep if in_sample

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
         rep | 77,765,076    .3075126    .4614636          0          1

. local m14 = r(mean)

. local sd14 = r(sd)

. local min14 = r(min)

. local max14 = r(max)

. 
. sum unaffil if in_sample

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
     unaffil | 77,765,076     .272616     .445305          0          1

. local m15 = r(mean)

. local sd15 = r(sd)

. local min15 = r(min)

. local max15 = r(max)

. 
. unique id if in_sample
Number of unique values of id is  6480423
Number of records is  77765076

. local n_voters1 = r(unique)

. 
. egen non_miss = rownonmiss(hispanic black white othernw birth_year voted) if no_dmv_match
(76903032 missing values generated)

. replace in_sample = non_miss == 6
(75,406,548 real changes made)

. drop non_miss

. 
. sum voted if in_sample

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
       voted |  2,358,528    .2286952    .4199926          0          1

. local m7 = r(mean)

. local sd7 = r(sd)

. local min7 = r(min)

. local max7 = r(max)

. local n7 = r(N)

. 
. sum hispanic if in_sample

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
    hispanic |  2,358,528    .0471345    .2119265          0          1

. local m8 = r(mean)

. local sd8 = r(sd)

. local min8 = r(min)

. local max8 = r(max)

. 
. sum black if in_sample

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
       black |  2,358,528    .3899381    .4877361          0          1

. local m9 = r(mean)

. local sd9 = r(sd)

. local min9 = r(min)

. local max9 = r(max)

. 
. sum white if in_sample

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
       white |  2,358,528    .5043451    .4999812          0          1

. local m10 = r(mean)

. local sd10 = r(sd)

. local min10 = r(min)

. local max10 = r(max)

. 
. sum othernw if in_sample

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
     othernw |  2,358,528    .0585823    .2348413          0          1

. local m11 = r(mean)

. local sd11 = r(sd)

. local min11 = r(min)

. local max11 = r(max)

. 
. sum dem if in_sample

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
         dem |  2,358,528    .5746296    .4943992          0          1

. local m16 = r(mean)

. local sd16 = r(sd)

. local min16 = r(min)

. local max16 = r(max)

. 
. sum rep if in_sample

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
         rep |  2,358,528    .1920791     .393935          0          1

. local m17 = r(mean)

. local sd17 = r(sd)

. local min17 = r(min)

. local max17 = r(max)

. 
. sum unaffil if in_sample

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
     unaffil |  2,358,528    .2332913    .4229262          0          1

. local m18 = r(mean)

. local sd18 = r(sd)

. local min18 = r(min)

. local max18 = r(max)

. 
. sum birth_year if in_sample

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
  birth_year |  2,358,528    1964.907    23.44387       1910       1999

. local m12 = r(mean)

. local sd12 = r(sd)

. local min12 = r(min)

. local max12 = r(max)

. 
. unique id if in_sample
Number of unique values of id is  196544
Number of records is  2358528

. local n_voters2 = r(unique)

. 
. log close
      name:  <unnamed>
       log:  /Users/jesse/Dropbox/voter_id/Replication/table1.log
  log type:  text
 closed on:  17 Aug 2020, 09:30:06
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
